90204: Function test for xfi:concept-data-type

Documentation

Tests of function xfi:concept-data-type($concept-name as xs:QName) as xs:QName

Owners

Name Affiliation Email Start End
Herm Fischer UBMatrix / Mark V Systems fischer@markv.com 05-02-2008 at 15:16:10

References

http://www.xbrl.org/Specification/XF-PWD-2006-12-07.htm#_Toc152670666

Test Case Variations


V-01 Returns correct data type for c1 concept

Documentation

Tests that c1 concept returns a data type of xbrli:stringItemType.

Inputs

  • schema: concept-data-type.xsd (DTS Discovery starting point) (ID=V01)
  • Function Call: xfi:concept-data-type( QName('http://xbrl.org/formula/conformance/example','concept:c1') )

    (against file V01)

Outputs

  • Result test: $result instance of xs:QName and count( $result ) eq 1 and $result eq QName('http://www.xbrl.org/2003/instance','xbrli:stringItemType')

V-02 Returns correct data type for c2 concept

Documentation

Tests that c2 concept returns a data type of xbrli:monetaryItemType.

Inputs

  • schema: concept-data-type.xsd (DTS Discovery starting point) (ID=V02)
  • Function Call: xfi:concept-data-type( QName('http://xbrl.org/formula/conformance/example','concept:c2') )

    (against file V02)

Outputs

  • Result test: $result instance of xs:QName and count( $result ) eq 1 and $result eq QName('http://www.xbrl.org/2003/instance','xbrli:monetaryItemType')

V-03 Returns correct data type for t1 tuple

Documentation

This tuple has an anonymous type, which according to function description returns an empty sequence. (In prior version of test case, this test assumed that tuple concept data type is xs:anyType because tuples are complexContent which have xs:anyType as their restriction base.)

Inputs

  • schema: concept-data-type.xsd (DTS Discovery starting point) (ID=V03)
  • Function Call: xfi:concept-data-type( QName('http://xbrl.org/formula/conformance/example','concept:t1') )

    (against file V03)

Outputs

  • Result test: empty($result)

V-03a Returns correct data type for t2 tuple

Documentation

Tuple t2 has a complex type which is not anonymous, type QName is returned.

Inputs

  • schema: concept-data-type.xsd (DTS Discovery starting point) (ID=V03a)
  • Function Call: xfi:concept-data-type( QName('http://xbrl.org/formula/conformance/example','concept:t2') )

    (against file V03a)

Outputs

  • Result test: $result instance of xs:QName and count( $result ) eq 1 and $result eq xs:QName('concept:myTuple')

V-04 Raises an error for non-xbrl element argument

Documentation

Tests that error is detected when the element is not an XBRL concept.

Inputs

  • schema: concept-data-type.xsd (DTS Discovery starting point) (ID=V04)
  • Function Call: xfi:concept-data-type( QName('http://xbrl.org/formula/conformance/example','concept:nonXbrlElement') )

    (against file V04)

Outputs

  • Error code: xfie:invalidConceptQName

V-05 Raises an error for an attribute declaration argument

Documentation

Tests that error is detected when the argument declares an attribute.

Inputs

  • schema: concept-data-type.xsd (DTS Discovery starting point) (ID=V05)
  • Function Call: xfi:concept-data-type( QName('http://xbrl.org/formula/conformance/example','concept:anAttribute') )

    (against file V05)

Outputs

  • Error code: xfie:invalidConceptQName

V-06 Raises an error for an xbrli namespace'ed argument

Documentation

Tests that error is detected when the argument is xbrli:item

Inputs

  • schema: concept-data-type.xsd (DTS Discovery starting point) (ID=V06)
  • Function Call: xfi:concept-data-type( QName('http://www.xbrl.org/2003/instance','xbrli:item') )

    (against file V06)

Outputs

  • Error code: xfie:invalidConceptQName

Revisions

Name On Details
Herm Fischer 05-02-2008 at 15:16:10 Created the test case.